OPC Studio User's Guide and Reference
TargetDataEventHandler<TData,TTarget> Delegate



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.ComponentModel.Linking Namespace : TargetDataEventHandler<TData,TTarget> Delegate
Type of data handled by this delegate.
Type of target object.
The source of the event. This is set to the target object of the linking.
The event arguments; contain the actual event data.
Represents the method that will handle a data event that carries data of TData type for a target object of TTarget type.
Syntax
'Declaration
 
<CLSCompliantAttribute(False)>
<ComVisibleAttribute(False)>
Public Delegate Sub TargetDataEventHandler
    (Of TData,TTarget As Class)( _
   ByVal sender As Object, _
   ByVal e As TargetDataEventArgs(Of TData,TTarget) _
) 
'Usage
 
Dim instance As New TargetDataEventHandler(Of TData,TTarget)(AddressOf HandlerMethod)
[CLSCompliant(false)]
[ComVisible(false)]
public delegate void TargetDataEventHandler<TData,TTarget>( 
   object sender,
   TargetDataEventArgs<TData,TTarget> e
)
where TTarget: class
[CLSCompliant(false)]
[ComVisible(false)]
generic<typename TData>
generic<typename TTarget>
public delegate void TargetDataEventHandler( 
   Object^ sender,
   TargetDataEventArgs<TData^,TTarget^>^ e
)
where TTarget: ref class

Parameters

sender
The source of the event. This is set to the target object of the linking.
e
The event arguments; contain the actual event data.

Type Parameters

TData
Type of data handled by this delegate.
TTarget
Type of target object.
Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also